package io;

import java.io.File;
import java.io.IOException;
//文件属性及创建
public class IODemo2 {
    public static void main(String[] args) throws IOException {
        File file = new File("./text.txt");
        System.out.println(file.exists());
        System.out.println(file.isFile());
        System.out.println(file.isDirectory());
        boolean ret = file.createNewFile();//此时多了一个文件
        System.out.println("ret = " + ret);
    }
}
